<template>
    <base-layout activeIndex="/order">
        <div slot="content">
             <el-input placeholder="请输入内容" v-model="searchInput" class="input-with-select">
                <span slot="prepend"><i class="el-icon-edit"></i>订单检索</span>
                <el-button slot="append" icon="el-icon-search" @click="doSearch"></el-button>
            </el-input>
            <div style="margin-top:1rem"></div>

            <el-table :data="tableData" border stripe highlight-current-row >
                <el-table-column type="expand">
                    <template slot-scope="props">
                        <el-table :data="props.goods" border stripe highlight-current-row >
                            <el-table-column label="商品二级分类" prop="typeName"></el-table-column>
                            <el-table-column label="商品一级分类" prop="typeParent"></el-table-column>
                            <el-table-column label="商品数量" prop="orderNum"></el-table-column>
                            <el-table-column label="商品总价" prop="orderSum"></el-table-column>
                        </el-table>
                    </template>
                </el-table-column>
                <el-table-column fixed label="商品名称" prop="goodsName" width="150"></el-table-column>
                <el-table-column label="订单状态" prop="orderStatus"></el-table-column>
                <el-table-column label="订单用户" prop="userPhone"></el-table-column>
                <el-table-column label="订单总价" prop="orderSum"></el-table-column>
                <el-table-column label="订单物流信息" prop="orderLogistics"></el-table-column>
                <el-table-column
                fixed="right"
                label="操作"
                width="100">
                <template slot-scope="scope">
                <el-button type="text" size="small" @click="editDetail(scope.$index)">编辑物流信息</el-button>
                </template>
            </el-table-column>
            </el-table>

            <div style="margin-top:1rem"></div>
            <el-pagination
                layout="prev, pager, next"
                :total="tableTotal"
                :page-size="20"
                @current-change="pageChange"
                >
            </el-pagination>
        </div>
    </base-layout>
</template>

<script>
import api from '../api'
import BaseLayout from '@/components/BaseLayout'
export default {
  components:{
      "base-layout":BaseLayout
  },
  data(){
      return {
          searchInput: "",
          tableTotal :[],
          currentPage : 0
      }
  },
  methods:{
      _fetchData(limit,offset,userId){
          api.fetchOrderInfo(limit,offset,userId)
      },
      doSearch(){

      },
      pageChange(currentPage){

      }
  }
}
</script>

<style>

</style>
